{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2012 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

{capture name=path}{l s='Contact'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}


<div class="clearfix">&nbsp;</div>
{if isset($confirmation)}
	<div class="c_success">
	<p>{l s='Your message has been successfully sent to our team.'}</p>
	</div>
{elseif isset($alreadySent)}
	<div class="c_success">
	<p>{l s='Your message has already been sent.'}</p>
	</div>
{else}
	
	
	<form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std clearfix" enctype="multipart/form-data">
		<fieldset>
			<input type="hidden" name="id_contact" value="1" />
                           
			<p class="text">
                    <label for="name">{l s='Last name / First name'} : </label>
                    <input type="text" id="name" name="name"  />
                </p>			
    
                <p class="text">
                    <label for="email">{l s='E-mail address'} : </label>
                    {if isset($customerThread.email)}
                        <input type="text" id="email" name="from" value="{$customerThread.email|escape:'htmlall':'UTF-8'}" readonly="readonly" />
                    {else}
                        <input type="text" id="email" name="from" value="{$email|escape:'htmlall':'UTF-8'}" />
                    {/if}
                </p>
    
                <p class="text">
                    <label for="subject">{l s='Subject Heading'} : </label>
                    <input type="text" id="subject" name="subject" />
                </p>
                
            {if !$PS_CATALOG_MODE}
                {if (!isset($customerThread.id_order) || $customerThread.id_order > 0)}
                <p class="text select">
                    <label for="id_order">{l s='Order Reference'}</label>
                    {if !isset($customerThread.id_order) && isset($isLogged) && $isLogged == 1}
                        <select name="id_order" >
                            <option value="0">{l s='-- Choose --'}</option>
                            {foreach from=$orderList item=order}
                                <option value="{$order.value|intval}" {if $order.selected|intval}selected="selected"{/if}>{$order.label|escape:'htmlall':'UTF-8'}</option>
                            {/foreach}
                        </select>
                    {elseif !isset($customerThread.id_order) && !isset($isLogged)}
                        <input type="text" name="id_order" id="id_order" value="{if isset($customerThread.id_order) && $customerThread.id_order > 0}{$customerThread.id_order|intval}{else}{if isset($smarty.post.id_order)}{$smarty.post.id_order|intval}{/if}{/if}" />
                    {elseif $customerThread.id_order > 0}
                        <input type="text" name="id_order" id="id_order" value="{$customerThread.id_order|intval}" readonly="readonly" />
                    {/if}
                </p>
                {/if}
                {if isset($isLogged) && $isLogged}
                <p class="text select">
                <label for="id_product">{l s='Product'}</label>
                    {if !isset($customerThread.id_product)}
                    {foreach from=$orderedProductList key=id_order item=products name=products}
                        <select name="id_product" id="{$id_order}_order_products" class="product_select" style="width:300px;{if !$smarty.foreach.products.first} display:none; {/if}" {if !$smarty.foreach.products.first}disabled="disabled" {/if}>
                            <option value="0">{l s='-- Choose --'}</option>
                            {foreach from=$products item=product}
                                <option value="{$product.value|intval}">{$product.label|escape:'htmlall':'UTF-8'}</option>
                            {/foreach}
                        </select>
                    {/foreach}
                    {elseif $customerThread.id_product > 0}
                        <input type="text" name="id_product" id="id_product" value="{$customerThread.id_product|intval}" readonly="readonly" />
                    {/if}
                </p>
                {/if}
            {/if}
            
            <p class="textarea">
                <label for="message">{l s='Message'}</label>
                 <textarea id="message" name="message" rows="15" cols="10">{if isset($message)}{$message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea>
            </p>
            {include file="$tpl_dir./errors.tpl"}
            <p class="submit clearfix">
                <input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" onclick="$(this).hide();" />
            </p>
            <div class="footer_contact clearfix"> 
                <div class="block_2">
                	<h4>SHOWROOM</h4>
                
                    <p>12, rue Saint Fiacre<br />
                    75002 Paris, France<br />
                    Tél +33 (0) 1 42 33 88 39<br />
                    info@mktstudio.com</p>
                </div>
                <div class="block_2">
                	<h4>PRESSE</h4>
                
                    <p>DRESSCODE<br />
                    Tel: 01 42 33 58 89<br />
                    aurelie@dresscodepress.com<br />
                    <a class="presse" href="#">> Presse</a></p>
                </div>
            </div>
	</fieldset>
</form>
{/if}
